{template 'common/header'}
{php echo $this -> set_tabbar($action, 2);}
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <div class="panel panel-default">
            <div class="panel-heading">
                {$title}
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="title" value="{$item['title']}" id="title" class="form-control"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">电话</label>
                    <div class="col-sm-9">
                        <input type="text" name="tel" id="tel" value="{$item['tel']}" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">地址</label>
                    <div class="col-sm-9">
                        <input type="text" name="address" id="address" value="{$item['address']}" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家所在地区</label>

                        <div class="col-sm-3">
                            <select name="location_p" id="location_p" class="location form-control"></select>
                        </div>
                            <div class="col-sm-3">
                        <select name="location_c" id="location_c" class="location form-control"></select>
                            </div>
                                <div class="col-sm-3">
                        <select name="location_a" id="location_a" class="location form-control"></select>
                                </div>
                        <script type="text/javascript" src="../addons/weisrc_icard/template/js/region_select.js"></script>
                        <script type="text/javascript">
                            var location_p = "{if !empty($item['location_p'])}{$item['location_p']}{else}广东省{/if}";
                            var location_c = "{if !empty($item['location_c'])}{$item['location_c']}{else}汕头市{/if}";
                            var location_a = "{if !empty($item['location_a'])}{$item['location_a']}{else}龙湖区{/if}";
                            new PCAS("location_p", "location_c", "location_a", location_p, location_c, location_a);
                        </script>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">坐标</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_coordinate('baidumap', $item)}
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <input name="submit" type="submit" value="保存设置" class="btn btn-primary span3">
                <input type="hidden" name="token" value="{$_W['token']}"/>
            </div>
        </div>
    </form>
</div>
{template 'common/footer'}
